<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../vue.js"></script>
</head>
<body>
    <div id="app">
        <cpn :number1='num1' :number2='num2'></cpn>
    </div>
    <template id='cpn'>
        <div>
            <h2>{{number1}}</h2>
            <h2>{{dnumber1}}</h2>
            <input type="text" v-model='dnumber1'>
            <h2>{{number2}}</h2>
            <h2>{{dnumber2}}</h2>
            <input type="text" v-model='dnumber2'>
        </div>
    </template>
    <script>
        const app=new Vue({
            el:'#app',
            data:{
                num1:1,
                num2:0,
            },
            methods:{},
            components:{
                cpn:{
                    template:'#cpn',
                    props:{
                        number1:Number,
                        number2:Number,
                    },
                    data(){
                        return{
                            dnumber1:this.number1,
                            dnumber2:this.number2,
                        }
                    }
                }
            }
        });
    </script>
</body>
</html>